package com.springboot.base.common;

/**
 * @author meiguangya
 */
public enum ResponseCode {
    /**
     * 通用返回
     */
    SUCCESS(1,"success"),
    ERROR(0,"fail"),

    /**
     * 用户相关返回
     */
    NEED_LOGIN(10,"需要登录"),
    ILLEGAL_ARGUMENT(2,"ILLEGAL_ARGUMENT");

    private final int code;
    private final String desc;

    ResponseCode(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
